package Mybatis.service;

import Mybatis.dao.IUserDao;
import Mybatis.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
public class UserService {
    @Autowired
    private IUserDao userDao;

    public List<User> findAll(){
        return userDao.findAll();
    }

    public void save(User user){
        userDao.save(user);
    }

    public void update(String name,String address,Integer id){
        userDao.update(name,address,id);
    }

    public void delete(Integer id){

    }
}
